<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>向“亻中 阝日”付款</title>
    <style>
    * {
        margin: 0;
        padding: 0;
        font-family: Microsoft yahei;
    }

    body {
        background-color: #fff;
    }

    .code-item {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        padding-bottom: 1px;
        background-color: #5c92ef;
    }

    .code-title {
        height: 100px;
        background-image: url("logo.png");
        background-color: #f2f2f2;
        background-position: center;
        background-repeat: no-repeat;
        background-size: 60%;
    }

    .code-area {
        margin: 65px 0;
        text-align: center;
    }

    #qrcode {
        margin: 0 auto;
        padding: 30px 5px 26px 5px;
        width: 250px;
        min-height: 200px;
        text-align: center;
        background-color: #fff;
    }

    .code-footer {
        height: 60px;
        text-align: center;
        background-color: #fff;
        color: #666;
        line-height: 60px;
        font-size: 20px;
        margin: 0px 1px 60px 1px;
    }
    </style>
</head>

<body>
    <div class="code-item">
        <div class="code-title"></div>
        <div class="code-area">
            <div id="qrcode"></div>
        </div>
        <div class="code-footer">请使用微信/支付宝/QQ扫码付款</div>
    </div>
    <script src="jquery.min.js"></script>
    <script src="jquery.qrcode.min.js"></script>
    <script>
    var wx = 'https://payapp.weixin.qq.com/qr/AQGbByEumdoS5mw15yiK1e-C?t=CwAC#wechat_pay'
    var ap = 'https://qr.alipay.com/tsx03078ljqhlh3twpvqca9'
    var qq = 'https://i.qianbao.qq.com/wallet/sqrcode.htm?m=tenpay&a=1&u=416657468&ac=B61E692995C547783E5FB16CD7B3DB91632D1FBFF2B16A287B927C920E0A5EDB&n=liuzy&f=wallet'
    $(function() {
        var UA = navigator.userAgent;
        if (UA.indexOf(' Alipay') !== -1) {
            location.href = ap;
        } else if (UA.indexOf(' MicroMessenger') !== -1) {
            $('.code-footer').html('长按"识别图片中的二维码"向我付款')
            $('#qrcode').qrcode({
                width: 200,
                height: 200,
                text: wx
            })
        } else if (UA.indexOf(' QQ/') !== -1) {
            $('.code-footer').html('长按图片"扫描二维码"向我付款')
            $('#qrcode').qrcode({
                width: 200,
                height: 200,
                text: ap
            })
        } else {
            $('#qrcode').qrcode({
                width: 200,
                height: 200,
                text: 'https://pay.liuzy88.com'
            })
        }
    })
    </script>
</body>

</html>